<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3">
<head th:include="public/page_css::page_css ('查看ASN收货')" />

<body>
<div class="layui-fluid larry-wrapper">
    <form class="layui-form layui-card-header  layui-card-header-auto" id="searchForm1">
        <input type="hidden" th:value="${id}" id="pid" name="id">
    </form>
    <div class="pro">
        <table id="table9"  class="table text-nowrap"></table>
    </div>
</div>
</body>
<div th:include="public/public_js::public_js"></div>

<script th:inline="javascript">
    $(function () {
    })

</script>
<script>
    var tabs;
    layui.use(['myform','zzpUtils','form','jquery'],function () {

        var  zzpUtils = layui.zzpUtils,
            $ = layui.jquery;

        tabs = zzpUtils.table({
            elem: '#table9',
            isApi: true,
            pagination:false,
            columns: [{
                field: 'show_zt',
                title: '明细状态'
            }, {
                field: 'hpbh',
                title: '货品编号'
            }, {
                field: 'hpmc',
                title: '货品名称'
            },{
                field: 'nc',
                title: 'NC编码'
            },{
                field: 'gg',
                title: '规格'
            }, {
                field: 'ms',
                title: '主单位'
            }, {
                field: 'yqsl',
                title: '预期数量'
            }, {
                field: 'sdsl',
                title: '收货数量'
            }, {
                field: 'hppc',
                title: '货品批号'
            }, {
                field: 'sxrq',
                title: '失效日期'
            }, {
                field: 'scrq',
                title: '生产日期'
            }, {
                field: 'pssl',
                title: '破损数量'
            }, {
                field: 'jssl',
                title: '拒收数量'
            }, {
                field: 'wssl',
                title: '未收数量'
            }, {
                field: 'xdwsl',
                title: '预期数量(箱单位)'
            }, {
                field: 'tj',
                title: '体积'
            }, {
                field: 'jz',
                title: '净重'
            }, {
                field: 'zl',
                title: '毛重'
            }, {
                field: 'je',
                title: '金额'
            }]
        });
        $(function () {
            $.ajax({
                url: "/zxsswms/wmsEstimatedArrivalOrderDetailed/list",
                type: "POST",
                dataType: "JSON",
                contentType: 'application/json',
                async: false,
                data:JSON.stringify({id:$('#pid').val()}),
                success: function (data) {
                    tabs.bootstrapTable('append', data);
                },
                error: function () { console.log("Error"); }
            });
        })

    });
</script>
</html>